Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
@material/dom
Advanced tools
MDC DOM provides commonly-used utilities for inspecting, traversing, and manipulating the DOM.
Most of the time, you shouldn't need to depend on mdc-dom
directly. It is useful however if you'd like to write custom components that follow MDC Web's pattern and elegantly integrate with the MDC Web ecosystem.
npm install @material/dom
import * as ponyfill from '@material/dom/ponyfill';
See Importing the JS component for more information on how to import JavaScript.
The ponyfill
module provides the following functions:
Function Signature | Description |
---|---|
closest(element: Element, selector: string) => ?Element | Returns the ancestor of the given element matching the given selector (which may be the element itself if it matches), or null if no matching ancestor is found. |
matches(element: Element, selector: string) => boolean | Returns true if the given element matches the given CSS selector. |
External frameworks and libraries can use the following event utility methods.
Method Signature | Description |
---|---|
util.applyPassive(globalObj = window, forceRefresh = false) => object | Determine whether the current browser supports passive event listeners |
NOTE: The function
util.applyPassive
cache its results;forceRefresh
will force recomputation, but is used mainly for testing and should not be necessary in normal use.
FAQs
DOM manipulation utilities for Material Components for the web
The npm package @material/dom receives a total of 406,586 weekly downloads. As such, @material/dom popularity was classified as popular.
We found that @material/dom demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 15 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.